<template>
  <div class="app-container">
    <el-table :data="dataList" border>
      <el-table-column type="index" width="50" label="序号" align="center" />
      <el-table-column prop="userName" label="用户名" width="200" />
      <el-table-column prop="userRandomId" label="用户UID" width="180" />
      <el-table-column prop="rechargeAmount" label="充值金额" width="180" />
      <el-table-column prop="withdrawalAmount" label="提现金额" width="180" />
      <el-table-column prop="totalGift" label="彩金赠送金额" width="180" />
      <el-table-column prop="goldCoin" label="彩金赠送代币" width="180" />
      <el-table-column prop="amountOfActivity" label="活动赠送" width="180" />
      <el-table-column prop="chargeTheDifferenceToday" label="今日充提差" width="180" />
      <el-table-column prop="totalChargeLift" label="总充提差" width="180" />
      <el-table-column prop="createTime" label="注册时间" width="180">
        <template slot-scope="scope">
          <span>{{$yun.convertTimestamp(scope.row.createTime)}}</span>
        </template>
      </el-table-column>
      <el-table-column prop="lastLoginTime" label="最后登录时间" width="180">
        <template slot-scope="scope">
          <span>{{$yun.convertTimestamp(scope.row.lastLoginTime)}}</span>
        </template>
      </el-table-column>
    </el-table>
    <pagination
      v-show="total>0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
    />
  </div>
</template>

<script>

import { profitAndLossStatistics } from "@/api/statement/rechargeReport"

export default {
  data () {
    return {
      dataList: [],
      loading: false,
      total: 0,
      queryParams: {
        pageNum: 1,
        pageSize: 10,
      },
    }
  },
  created () {
    this.getList()
  },
  methods: {

    getList () {
      this.loading = true
      profitAndLossStatistics(this.queryParams).then(response => {
        this.dataList = response.data.records
        this.total = response.data.total
        this.loading = false
      })
    },
  },
}
</script>
